---

import { getCollection } from 'astro:content';
import MainLayout from '../../layouts/MainLayout.astro';

export async function getStaticPaths() {
  const blogEntries = await getCollection('devlog');
  return blogEntries.map(entry => ({
    params: { slug: entry.slug }, props: { entry },
  }));
}

const { entry } = Astro.props;
const { Content } = await entry.render();
---
<MainLayout frontmatter={{ title: entry.data.title, description: '', date: entry.data.date, author: entry.data.author}}>
  <Content />
</MainLayout>
